require("@nomicfoundation/hardhat-toolbox")
require("dotenv").config()
require("./tasks/block-number")
require("hardhat-gas-reporter")
require("solidity-coverage")

const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL || ""
const SEPOLIA_PRIVATE_KEY = process.env.SEPOLIA_PRIVATE_KEY || ""
const SEPOLIA_CHAIN_ID = process.env.SEPOLIA_CHAIN_ID || ""
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""
const COIN_MARKETCAP_KEY = process.env.COIN_MARKETCAP_KEY || ""

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
    defaultNetwork: "hardhat",
    networks: {
        sepolia: {
            url: SEPOLIA_RPC_URL,
            accounts: [SEPOLIA_PRIVATE_KEY],
            // chainId: SEPOLIA_CHAIN_ID
        },
    },
    etherscan: {
        // Your API key for Etherscan
        // Obtain one at https://etherscan.io/
        apiKey: ETHERSCAN_API_KEY,
    },
    sourcify: {
        // Disabled by default
        // Doesn't need an API key
        enabled: true,
    },
    gasReporter: {
        enabled: true,
        outputFile: "gas-report.txt",
        noColor: true,
        currency: "USD",
        coinmarketcap: COIN_MARKETCAP_KEY
    },
    solidity: "0.8.24",
}
